<?php 
include("conn.php");
include('seguridad.php');
$pkuser='01';
$query ="delete from bt14situes where bt14ides='".$pkuser."'";
echo 'eliminado '.$mysqli->query($query);
foreach ($_REQUEST["seleccion"] as $value) {
$query = "INSERT INTO `bt14situes`(`bt14cosi`,`bt14ides`,`bt14esta`)
													VALUES (
													        '$value',
													        '$pkuser','checked');";
echo $mysqli->query($query);
}
print "<script>alert('Se inserto con exito');</script>";
print "<script>window.open('../Usuarios/index.php', '_self');</script>";
 header('Location: GestionCondiciones2.php'); 
?>